/*
 * 项目名称:    wms-server-jeecg
 * 创建人员:    DongPeng
 * 创建时间:    2023-10-04
 * copyright(c) 2022 无锡星智数服科技有限公司
 */
package org.jeecg.modules.dock.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.dock.entity.mds.MdsBaseResponseVO;
import org.jeecg.modules.dock.entity.mds.request.*;
import org.jeecg.modules.dock.service.MdsDockingRepeaterService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 内部对接MDS控制器
 *
 * @author DongPeng
 * @version 1.0.0
 * @date 2023-10-04
 * @description 类描述
 */
@Slf4j
@RestController
@RequestMapping("/mds/repeater")
@RequiredArgsConstructor
@Api(tags = "内部对接MDS控制器")
public class MdsDockingRepeaterController {

    private final MdsDockingRepeaterService mdsDockingRepeaterService;

    @ApiOperation(value = "横剪叫料", notes = "横剪叫料")
    @PostMapping("/mdsTransverseShearingIsCalledMaterial")
    public MdsBaseResponseVO mdsTransverseShearingIsCalledMaterial(@RequestBody MDSTransverseShearingIsCalledMaterialRequestVO vo) {
       return mdsDockingRepeaterService.mdsTransverseShearingIsCalledMaterial(vo);
    }

    @ApiOperation(value = "横剪退料", notes = "横剪退料")
    @PostMapping("/mdsCrossShearingToWithdrawMaterial")
    public MdsBaseResponseVO mdsCrossShearingToWithdrawMaterial(@RequestBody MDSCrossShearingToWithdrawMaterialRequestVO vo) {
        return mdsDockingRepeaterService.mdsCrossShearingToWithdrawMaterial(vo);
    }

    @ApiOperation(value = "横剪叫料板", notes = "横剪叫料板")
    @PostMapping("/mdsTransverseShearIsCalledMaterialPlate")
    public MdsBaseResponseVO mdsTransverseShearIsCalledMaterialPlate(@RequestBody MDSTransverseShearIsCalledMaterialPlateRequestVO vo) {
        return mdsDockingRepeaterService.mdsTransverseShearIsCalledMaterialPlate(vo);
    }

    @ApiOperation(value = "横剪叫废料箱", notes = "横剪叫废料箱")
    @PostMapping("/mdsTheTransverseShearIsCalledAScrapBin")
    public MdsBaseResponseVO mdsTheTransverseShearIsCalledAScrapBin(@RequestBody MDSTheTransverseShearIsCalledAScrapBinRequestVO vo) {
        return mdsDockingRepeaterService.mdsTheTransverseShearIsCalledAScrapBin(vo);
    }

    @ApiOperation(value = "横剪退废料箱", notes = "横剪退废料箱")
    @PostMapping("/mdsCrossCutTheScrapBin")
    public MdsBaseResponseVO mdsCrossCutTheScrapBin(@RequestBody MDSCrossCutTheScrapBinRequestVO vo) {
        return mdsDockingRepeaterService.mdsCrossCutTheScrapBin(vo);
    }

    @ApiOperation(value = "横剪入库", notes = "横剪入库")
    @PostMapping("/mdsCrossCutIntoStorage")
    public MdsBaseResponseVO mdsCrossCutIntoStorage(@RequestBody MDSCrossCutIntoStorageRequestVO vo) {
        return mdsDockingRepeaterService.mdsCrossCutIntoStorage(vo);
    }

    @ApiOperation(value = "叠片叫料", notes = "叠片叫料")
    @PostMapping("/mdsLaminationIsCalledMaterial")
    public MdsBaseResponseVO mdsLaminationIsCalledMaterial(@RequestBody MDSLaminationIsCalledMaterialRequestVO vo) {
        return mdsDockingRepeaterService.mdsLaminationIsCalledMaterial(vo);
    }

    @ApiOperation(value = "叠片退料", notes = "叠片退料")
    @PostMapping("/mdsLaminationAndRefeeding")
    public MdsBaseResponseVO mdsLaminationAndRefeeding(@RequestBody MDSLaminationAndRefeedingRequestVO vo) {
        return mdsDockingRepeaterService.mdsLaminationAndRefeeding(vo);
    }

    @ApiOperation(value = "叠片退料板", notes = "叠片退料板")
    @PostMapping("/mdsLaminatedRefeedingPlate")
    public MdsBaseResponseVO mdsLaminatedRefeedingPlate(@RequestBody MDSLaminatedRefeedingPlateRequestVO vo) {
        return mdsDockingRepeaterService.mdsLaminatedRefeedingPlate(vo);
    }

    @ApiOperation(value = "条料调拨入库", notes = "条料调拨入库")
    @PostMapping("/materialTransferAndWarehousing")
    public MdsBaseResponseVO materialTransferAndWarehousing(@RequestBody MaterialTransferAndWarehousingRequestVO vo) {
        return mdsDockingRepeaterService.materialTransferAndWarehousing(vo);
    }

    @ApiOperation(value = "条料库叫料架", notes = "条料库叫料架")
    @PostMapping("/malledMaterialRack")
    public MdsBaseResponseVO malledMaterialRack(@RequestBody MalledMaterialRackRequestVO vo) {
        return mdsDockingRepeaterService.malledMaterialRack(vo);
    }

    @ApiOperation(value = "条料调拨出库", notes = "条料调拨出库")
    @PostMapping("/materialTransferAndOutbound")
    public MdsBaseResponseVO materialTransferAndOutbound(@RequestBody MaterialTransferAndOutboundRequestVO vo) {
        return mdsDockingRepeaterService.materialTransferAndOutbound(vo);
    }

    @ApiOperation(value = "强制完成", notes = "强制完成")
    @PostMapping("/forceComplete")
    public MdsBaseResponseVO forceComplete(@RequestBody ForceCompleteRequestVO vo) {
        return mdsDockingRepeaterService.forceComplete(vo);
    }

    @ApiOperation(value = "配送", notes = "配送")
    @PostMapping("/delivery")
    public MdsBaseResponseVO delivery(@RequestBody MDSDeliveryRequestVO vo) {
        return mdsDockingRepeaterService.delivery(vo);
    }

    @ApiOperation(value = "退空料架", notes = "退空料架")
    @PostMapping("/emptyMaterialRack")
    public MdsBaseResponseVO emptyMaterialRack(@RequestBody EmptyMaterialRackRequestVO vo) {
        return mdsDockingRepeaterService.emptyMaterialRack(vo);
    }

    @ApiOperation(value = "即时库存", notes = "即时库存")
    @PostMapping("/repertory")
    public MdsBaseResponseVO repertory() {
        return MdsBaseResponseVO.ok(mdsDockingRepeaterService.repertory());
    }

}
